package com.carryon.modules.sj;

import com.carryon.lang.MapJ;

/**
 * @author Helin
 * @mail hl_0074@sina.com
 * @date 2011-9-26
 * 
 */
public class SJ {

	private MapJ request = new MapJ();
	private Response response = new Response();
	private MapJ cookie = new MapJ();
	private MapJ session = new MapJ();

	protected void status(int status) {

		this.response.status(status);
	}

	protected void errorMessage(String message) {

		this.response.message(message);
	}

	protected String session(String name) {

		return this.session.getString(name);
	}

	protected String request(String name) {

		return this.request.getString(name);
	}

	protected String cookie(String name) {

		return cookie.getString(name);
	}

	protected void response(String name, Object value) {

		this.response.put(name, value);
	}

	public MapJ getRequest() {

		return request;
	}

	public Response getResponse() {

		return response;
	}

	public MapJ getCookie() {

		return cookie;
	}

	public MapJ getSession() {

		return session;
	}

}
